package com.hy.demo.ui.fragment;

import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;

import com.hy.demo.app.BaseFragment;
import com.hy.demo.R;
/**
 * title MsgFragment
 * author HeYan
 * time 2021/2/3 15:02
 * desc 无
 */
public class MsgFragment extends BaseFragment {

    @Override
    protected int getLayoutId() {
        return R.layout.f_msg;
    }

    @Override
    protected void initView() {

    }

    @Override
    protected void initData() {
        setTitle("消息");
    }


    public static MsgFragment newInstance(@Nullable FragmentActivity act) {
        if (act != null) {
            String tag = MsgFragment.class.getSimpleName();
            Fragment fragment = act.getSupportFragmentManager().findFragmentByTag(tag);
            if (fragment instanceof MsgFragment)
                return (MsgFragment) fragment;
        }
        return new MsgFragment();
    }
}
